package com.weaver.drools.business.execution.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.weaver.drools.business.execution.service.IEAqInsInsrectify127Service;
import com.weaver.drools.common.dao.EAqInsInsrectify127Dao;
import com.weaver.drools.common.entity.EAqInsInsrectify127;
@Service
public class EAqInsInsrectify127ServiceImpl implements IEAqInsInsrectify127Service {
	
	@Autowired
	private EAqInsInsrectify127Dao EAqInsInsrectify127Dao;
	@Override
	public EAqInsInsrectify127 findLastBeanByInpectionPandectId(String inpectionPandectId) throws Exception {
		String hql="from EAqInsInsrectify127 where isdeleted=0 and rownum=1";
		if(inpectionPandectId!=null && !inpectionPandectId.equals("")){
			hql+=" and EAqInsInpectionpandect599.inpectionpandectid="+inpectionPandectId;
		}
		hql+=" order by insrectifyid desc";
		return EAqInsInsrectify127Dao.findEntity(hql);
	}

}
